#pragma once

template<typename T>
class CSingleton
{
private:
	static T* pInstance;

public:
	CSingleton()
	{
		pInstance = static_cast<T*>(this);
	}

public:
	static T* GetInstancePtr()
	{
		return pInstance;
	}

	static T& GetInstance()
	{
		return *pInstance;
	}

};